package com.ctshk.rpc.order.scenic.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

@AllArgsConstructor
public enum ScenicScheduledStatus {

    // 预订状态  好像有好多种搞不清楚先定义这两种，后面发现硬编码请修改添加过来
    DECIDED(5, "确认成功"),
    TO_BE_DECIDED(4, "待确认");

    @Getter
    @Setter
    private int code;

    @Getter
    @Setter
    private String value;

    public static String parseValue(int code) {
        for (ScenicScheduledStatus type : ScenicScheduledStatus.values()) {
            if (type.code == code) {
                return type.getValue();
            }
        }
        return null;
    }
}
